<{include file="public/header" title=''/}>
<style>
  html, body {width: 100%;height: 100%; margin: 0;  padding: 0; background-color:  #F2F2F2;}
  .layui-layout-admin .layui-header {background-color: #2F4056;}
</style>
<body class="">
<div class="layui-layout layui-layout-admin">
  <div class="layui-header">
    <div class="layui-logo">siku在线考试系统</div>
    <!-- 头部区域（可配合layui已有的水平导航） -->
    <!-- <ul class="layui-nav layui-layout-left">
      <li class="layui-nav-item">
        <a href="javascript:;">控制台</a>
        <dl class="layui-nav-child">
          <dd><a href="">邮件管理</a></dd>
          <dd><a href="">消息管理</a></dd>
          <dd><a href="">授权管理</a></dd>
        </dl>
      </li>
    </ul> -->
    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item" style="margin-right: 20px;">
        <a href="javascript:;">
          <img src="__ROOT__/public/static/img/001.jpg" class="layui-nav-img">
          <{$Think.session.username}>
        </a>
        <dl class="layui-nav-child">
          <dd><a href="javascript:;" id="info">基本资料</a></dd>
          <dd><a href="javascript:;" id="stupass">修改密码</a></dd>
          <dd><a href="<{:url('history')}>" id="history">考试历史</a></dd>
          <dd><a href="<{:url('index/login/out_login')}>" onclick="return out_login();">退出</a></dd>
        </dl>
      </li>

    </ul>
  </div>
  <div class="layui-container" >
      <div style="height: 50px;line-height: 46px;padding: 2px 0;">
        <span class="layui-breadcrumb">
          <a href="">首页</a>
          <a><cite>我的考试</cite></a>
        </span>
        <a class="layui-btn layui-btn-sm" style="float:right;margin-top: 10px;" href="javascript:location.replace(location.href);" title="刷新">
                <i class="layui-icon layui-icon-refresh"></i></a>
      </div>
      <{volist name="exams" id="vo"}>
    
      <div class="layui-card" eid="<{$vo.eid}>">
        <div class="layui-card-header"><{$vo.title}></div>
        <div class="layui-card-body">
          <{$vo.description}><span style="color:#ccc;float: right;">>></span>
        </div>
      </div>
    
      <{/volist}>
  </div>
  <div style="height: 50px;"></div>
  <div class="layui-footer" style="margin-left: -200px;">
            <!-- 底部固定区域 -->
            &copy; 2020 |&nbsp;<img src="" alt=""> <{$Think.config.app_name}> | <{$Think.config.site_name}> | Design by <a href="javascript:;" id="me"> hxb0810</a>

  </div>






</div>
</body>
  
 




<script>
//JavaScript代码区域
layui.use(['element','jquery','layer'], function(){
  var element = layui.element,$ = layui.$,layer=layui.layer;
  
  $(".layui-card").click(function(){
      var eid=$(this).attr('eid');
      
      //alert(eid);
      location.href="<{:url('index/paper')}>"+'?eid='+eid;
      // $.post("<{:url('check_paper')}>",{eid:eid},function(data,status){
      //      // layer.alert(data);
      //       //layer.alert(JSON.stringify(data));
      //       //console(data);
      //       if(data===1){
      //         location.href="<{:url('index/paper')}>"+'?eid='+eid;
      //       }else{
      //         layer.alert(data,{icon:5});
      //       }
      //  })
  });
  $('#info').on('click',function(){
                  layer.alert("姓名：<{$Think.session.username}><br>班级：<{$Think.session.class}>班<br>年级：<{$Think.session.grade|check_grade}><br>", {
                    skin: 'layui-layer-lan'
                    ,title:'我的信息'
                    ,closeBtn: 0
                    ,anim: 4 //动画类型
                  });
  });
  $('#stupass').on('click',function(){
               var index= layer.open({
                  title:'修改密码'
                  ,type: 2
                  //offset: '50px'
                  //,area: ['800px', '400px']
                  ,content: '<{:url('pass')}> ' 
                }); layer.full(index);
            
  });
  $('#me').on('click', function() {
                layer.open({
                    title: '朋友，你好！',
                    btn:'朕已知道',
                    type: 0,
                    scrollbar: false,
                    content: '<div style="width:300px; height:105px; background-color:#393D49;color: #fff; margin:-20px;"><div style="padding:20px;text-align:center;">Email:hxb0810@163.com<br>Tel:15534378771</div></div>',
                    area: ['300px', '200px'],
                    shadeClose: true
                });
             });

  
});
 function out_login(){
        if(confirm("确定要退出么？")){
        return true;
        }else{
        return false;
        }
    };
</script>
</body>
</html>